/**
 * 
 */
package com.skn;

import java.io.IOException;

import javax.mail.MessagingException;
import javax.mail.internet.AddressException;

import com.skn.constant.Constant;

/**
 * @author HuuGia
 *
 */
public class TestMailSender {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			String from = "phhuan504@yahoo.com";
			//String from = "huanph504@gmail.com";
            String to = "huanph504@gmail.com";
			//String to = "phhuan504@yahoo.com";
            String subject = "MailSender test sending mail";
            String body = "Testing";
            //String mailhost = Constant.SMTP_YAHOO_MAIL_HOST;
            String mailhost = Constant.PROTOCOL_SMTP + "." + Constant.HOST_YAHOO_MAIL;
            //String mailhost = Constant.POP_GMAIL_HOST;
            //String username = "huanph504";
            String username = "phhuan504";
            String password = "Huanpham";
            MailSender.sendSimpleMail(from, to, subject, body, mailhost, username, password);
//            try {
//				MailSender.getInboxMail(mailhost, username, password);
//			} catch (IOException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}

        } catch (AddressException e) {
            e.printStackTrace();
        } catch (MessagingException e) {
            e.printStackTrace();
        }

	}

}
